DBF Function

Syntax

Table_Name as C = DBF( [ Table_Name as C ] )

Arguments

Table_Name

Optional. Default = Primary table. The name of the Alpha table.

Description

DBF() returns the name of the current table. Specify an optional Table_Name to test a table other than the current one.

Example

Suppose you are combining records from two tables (using the Append operation), but want to keep track of the table into which each record was originally entered. Before appending the tables, add to each a new character field, eight spaces long, called DB_NAME. Then, use the Update Operation Genie to insert the table name into each record, using the following update expression:

? dbf()
= "Customer"

After you perform the global update, each record contains the name of the table in which it was originally entered. Now you can combine the tables into one file without losing track of each record's origin.

See Also